import Vue from 'vue'
//导入路由
import Router from 'vue-router'
import App from '@/App'
import HelloWorld from '@/components/HelloWorld'
import Login from '@/components/login/Login'
import Pswdlogin from '@/components/login/Pswdlogin'
import Messagelogin from '@/components/login/Messagelogin'
import Chongzhipswd from '@/components/login/Chongzhipswd'
import Zhuce from '@/components/login/Zhuce'
import Index from '@/components/index/Index'
import Top from '@/components/index/Top'
import Main from '@/components/index/Main'
import Lunbo from '@/components/index/Lunbo'
import Ceshi from '@/components/index/ceshi'
import Ceshi1 from '@/components/index/ceshi1'
import Footer from '@/components/index/footer'
import Personage from '@/components/index/Personage'
import Top1 from '@/components/index/Top1'
import Personagemain from '@/components/index/Personagemain'
import Personageindex from '@/components/index/Personageindex'
import Emailchongzhi from '@/components/login/emailchongzhi'
import Jiqiren from '@/components/index/Jiqiren'
import Pinglun from '@/components/index/pinglun'
import Mydoctor from '@/components/index/Mydoctor'
import Myzixun from '@/components/index/Myzixun'
import Peizhenservice from '@/components/index/Peizhenservice'
import Phoneservice from '@/components/index/Phoneservice'
import Xitongbanben from '@/components/index/Xitongbanben'
import Ceshitupian from '@/components/index/ceshitupian'
import Fck from '@/components/index/fck'
import Fmk from '@/components/index/fmk'
import  ScrollTop from '@/components/index/ScrollTop'
import  Guanxinbing from '@/components/index/Guanxinbing'

Vue.use(Router)

export default new Router({
  mode:'history',
  routes: [
      {
      path: '/scrolltop',
      name: 'ScrollTop',
      component: ScrollTop
    },
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld
    },
    {
      path: '/ceshitupian',
      name: 'Ceshitupian',
      component: Ceshitupian
    },
    {
      path: '/ceshi',
      name: 'Ceshi',
      component: Ceshi
    },
    {
      path: '/ceshi1',
      name: 'Ceshi1',
      component: Ceshi1
    },
    {
      path: '/fck',
      name: 'Fck',
      component: Fck,
      meta:{
        needLogin:true
        }
    },

    {
      path: '/fmk',
      name: 'Fmk',
      component: Fmk,
      meta:{
        needLogin:true
        }
    },
    {
      path: '/guanxinbing',
      name: 'Guanxinbing',
      component: Guanxinbing,
      meta:{
        needLogin:true
        }
    },
    {
      path: '/login',
      name: 'Login',
      component: Login,
 
        meta:{
    needLogin:true
    },
    },
    {
      path: '/index',
      name: 'Index',
      component: Index
    },
    {
      path: '/personage',
      name: 'Personage',
      component: Personage,
      meta:{
        needLogin:true
        }
    },
    {
      path: '/personageindex',
      name: 'Personageindex',
      component: Personageindex,
      meta:{
        needLogin:true
        }
    },
    {
      path:'/index/top',
      name:"Top",
      component:Top,
      
    },




    {
      path:'/emailchongzhi',
      name:"Emailchongzhi",
      component:Emailchongzhi,
   
    },  
    
    {
      path:'/jiqiren',
      name:"Jiqiren",
      component:Jiqiren
    },
    
    
    
    
    
    // 首页

    {
      path:'/index/main',
      name:"Main",
      component:Main,
      
    },
    {
      path:'/index/footer',
      name:"Footer",
      component:Footer,
   
    },
    {
      path:'/index/top',
      name:"Top",
      component:Top,
      
    },
    {
      path:'/index/main',
      name:"Main",
      component:Main,
      
    },
    {
      path:'/index/footer',
      name:"Footer",
      component:Footer,
     
    },
    {
      path:'/main/jiqiren',
      name:"Jiqiren",
      component:Jiqiren,
      
    },
    // 激活页
  
    {
      path:'/emailchongzhi/top',
      name:"Top",
      component:Top,
     
    },
    {
      path:'/emailchongzhi/main',
      name:"Main",
      component:Main,
     
    },
    {
      path:'/emailchongzhi/footer',
      name:"Footer",
      component:Footer,
      
    },
    {
      path:'/jihuosuccess/top',
      name:"Top",
      component:Top,
     
    },
    {
      path:'/jihuosuccess/main',
      name:"Main",
      component:Main,
     
    },
    {
      path:'/jihuosuccess/footer',
      name:"Footer",
      component:Footer,
     
    },
    //妇产科

    {
      path:'/fck/top1',
      name:"Top1",
      component:Top1,
     
    },
 
    {
      path:'/fck/footer',
      name:"Footer",
      component:Footer,
     
    },
//内分泌科
{
  path:'/fmk/top1',
  name:"Top1",
  component:Top1,
  
},

{
  path:'/fmk/footer',
  name:"Footer",
  component:Footer
},
//冠心病
{
  path:'/guanxinbing/top1',
  name:"Top1",
  component:Top1,
  
},

{
  path:'/guanxinbing/footer',
  name:"Footer",
  component:Footer
},
    // 个人首页
    {
      path:'/personageindex/top1',
      name:"Top1",
      component:Top1
    },
    {
      path:'/personageindex/main',
      name:"Main",
      component:Main
    },
    
    {
      path:'/personageindex/footer',
      name:"Footer",
      component:Footer
    },
    {
      path:'/personage/top1',
      name:"Top1",
      component:Top1
    },
    {
      path:'/personage/personagemain',
      name:"Personagemain",
      component:Personagemain
    },
    
    {
      path:'/personage/footer',
      name:"Footer",
      component:Footer
    },
    

    // 首页中间内容组件
    {
  
      mode:'history',
      linkActiveClass: "active",
      path: 'main',
      name: "Main",
      component:Main,
      children: [
        {
          path: 'lunbo',
          name: 'Lunbo',
          component: Lunbo
        },
      ]
    },   
    
    // 登录中间内容组件
    
{
  
    mode:'history',
    linkActiveClass: "active",
    path: '/login',
    name: "Login",
    component:Login,
    children: [
      {
        path: 'pswdlogin',
        name: 'Pswdlogin',
        component: Pswdlogin
      },
      {
        path: 'messagelogin',
        name: 'Messagelogin',
        component: Messagelogin
      },
      {
        path: 'chongzhipswd',
        name: 'Chongzhipswd',
        component: Chongzhipswd
      },
      {
        path: 'zhuce',
        name: 'Zhuce',
        component: Zhuce
      }


    ]
  },

  //个人中心页
  {
  
    mode:'history',
    linkActiveClass: "active",
    path: '/personage',
    name: "Personage",
    component:Personage,
    meta:{
      needLogin:true
      },
    children: [
      {
        path: 'pinglun',
        name: 'Pinglun',
        component: Pinglun
      }, {
        path: 'peizhenservice',
        name: 'Peizhenservice',
        component: Peizhenservice
      },
      {
        path: 'mydoctor',
        name: 'Mydoctor',
        component: Mydoctor
      },
      {
        path: 'myzixun',
        name: 'Myzixun',
        component: Myzixun
      },
      {
        path: 'phoneservice',
        name: 'Phoneservice',
        component: Phoneservice
      },
      {
        path: 'xitongbanben',
        name: 'Xitongbanben',
        component: Xitongbanben
      },
   
   

    ]
  },

  ]
})
